<template>
    <div>
        <div>
            <h1>我是App</h1>
            <button @click="$destroy()">点击驱逐舰</button>
            <button @click="num++">点击num+1</button>
            <h1>{{num}}</h1>
        </div>
        <Hello></Hello>
    </div>
</template>

<script>
import Hello from "./components/Hello.vue"
export default {
    name: "App",
    data() {
        return {
            num: 1
        };
    },
    components: {
        Hello,
    },
    beforeCreate() {
        console.log("-----beforeCreate");
    },
    created() {
        console.log("-----created");
    },
    beforeMount() {
        console.log("-----beforeMount");
    },
    mounted() {
        console.log("-----mounted");
    },
    beforeUpdate() {
        console.log("-----beforeUpdate");
    },
    updated() {
        console.log("-----updated");
    },
    beforeDestroy() {
        console.log("-----beforeDestroy");
    },
    destroyed() {
        console.log("-----destroyed");
    },
};
</script>

<style></style>
